#cs ----------------------------------------------------------------------------

	$Author: bjoern.kaiser $
	$LastChangedDate: 2008-04-30 12:45:08 +0000 (Wed, 30 Apr 2008) $

	Script Function:
	Imagex.exe wrapper
	
#ce ----------------------------------------------------------------------------

; Script Start - Add your code below here

#include-once

Func _imagex_apply($strWim, $strPath, $strIdentifier)
	Local $intRc
	Local $strCmd = 'imagex.exe /apply ' & $strWim & ' ' & $strIdentifier & ' ' & $strPath
	If Not $gBinTest Then
		_log("I","Imagex started")
		_log("I",$strCmd)
		$intRc = RunWait($strCmd)
		If Not $intRc Then _log("O","Imagex run successfully")
	Else
		_log("I",$strCmd)
	EndIf
	Return $intRc
EndFunc

